devfandomcom-20200223-history
PageFormatter
Page Formatter is a button-based Module that pops up when "Clean up" is clicked. Installation Features Variables * window.pipeSpace: This determines whether you want your pipe line spaced when formatted. ** Only true and false can be added. *** Example: window.pipeSpace = true; * window.CP: This plugin allows direct replacement of something in various pages as a JS object. Look below for a plugin. ** This must be an object otherwise the script might fail. *** Example: window.CP = { 'Reakon': 'Reckon', 'alex': 'Alex' } * The above object allows direct replacing of the objects to their respective values the moment 'Auto Fix Header and Asterisks' is pressed. Notes * Templates cannot be saved automatically after being formatted. Read the Tip section below for better ways to work around this predicament. * Auto fixing headers and asterisks by clicking its given button. * Variable replacement works with Regex. Tips * Minor editing is quicker when using "Content Dumps" and "Submit." Hopefully To Come/Do * Plugins. * Lots of fixes, jeez. * Make it look cleaner. * Finally post the new version. Common Misspelling Fixer /* Replaces misspelling on the left with the correct spelling on the right */ window.CP = { /* ------------- A ------------ */ 'absance' : 'absence', 'absense' : 'absence', 'acceptible' : 'acceptable', 'accidentaly' : 'accidentally', 'accidently' : 'accidentally', 'accomodate' : 'accommodate', 'acommodate' : 'accommodate', 'acheive' : 'achieve', 'acknowlege' : 'acknowledge', 'aknowledge' : 'acknowledge', 'acquaintence' : 'acquaintance', 'aquaintance' : 'acquaintance', 'adquire' : 'acquire', 'aquire' : 'acquire', 'aquit' : 'acquit', 'acerage' : 'acreage', 'acrage' : 'acreage', 'adress' : 'address', 'adultary' : 'adultery', 'adviseable' : 'advisable', 'advizable' : 'advisable', 'agression' : 'aggression', 'agressive' : 'aggressive', 'alegiance' : 'allegiance', 'allegaince' : 'allegiance', 'allegience' : 'allegiance', 'allmost' : 'almost', 'alot' : 'a lot', 'amatuer' : 'amateur', 'amature' : 'amateur', 'annualy' : 'annually', 'anually' : 'annually', 'aparent' : 'apparent', 'apparant' : 'apparent', 'artic' : 'arctic', 'arguement' : 'argument', 'athiest' : 'atheist', 'aweful' : 'awful', 'awfull' : 'awful', /* ------------- B ------------ */ 'becuase' : 'because', 'becomeing' : 'becoming', 'begining' : 'beginning', 'beleive' : 'believe', 'bellweather' : 'bellwether', 'bouy' : 'buoy', 'bouyant' : 'buoyant', 'buisness' : 'business', /* ------------- C ------------ */ 'calender' : 'calendar', 'camoflage' : 'camouflage', 'camoflague' : 'camouflage', 'capitol' : 'capital', /* The two words differ meanings, but "O" refers to the W-D.C Capitol or the Temple of Jupiter in Ancient Rome. */ 'Carribean' : 'Caribbean', 'catagory' : 'category', 'caugt' : 'caught', 'cauhgt' : 'caught', 'cematery' : 'cemetery', 'cemetary' : 'cemetery', 'changable' : 'changeable', 'cheif' : 'chief', 'collaegue' : 'colleague', 'collegue' : 'colleague', 'collectable' : 'collectible', 'colum' : 'column', 'comming' : 'coming', 'comitted' : 'committed', 'commited' : 'committed', 'conceed' : 'concede', 'congradulate' : 'congratulate', 'consciencious' : 'conscientious', 'concious' : 'conscious', 'consious' : 'conscious', 'concensus' : 'consensus', 'contraversy' : 'controversy', 'cooly' : 'coolly', /* The mispelling is disparaging, and while "coolly" formally means "cool", its colloquial variation also means the informal definition of "cooly" which is what a good-faith writer would intend. */ /* ------------- D ------------ */ 'dacquiri' : 'daiquiri', 'daquiri' : 'daiquiri', 'decieve' : 'deceive', 'definate' : 'definite', 'definit' : 'definite', 'defiantly' : 'definitely', /* Name me one work that uses "defiantly" as an adverb for "defiant". I dare you. */ 'definately' : 'definitely', 'definitly' : 'definitely', 'desparate' : 'desperate', 'diffrence' : 'difference', 'dilema' : 'dilemma', /* https://en.wikipedia.org/wiki/Dilema_veche */ 'disapoint' : 'disappoint', 'disasterous' : 'disastrous', 'drunkeness' : 'drunkenness', 'dumbell' : 'dumbbell', /* ------------- E ------------ */ 'embarass' : 'embarrass', 'equiptment' : 'equipment', 'excede' : 'exceed', 'exilerate' : 'exhilarate', 'existance' : 'existence', 'experiance' : 'experience', 'extreem' : 'extreme', /* ------------- F ------------ */ 'facinating' : 'fascinating', 'firey' : 'fiery', /* Mispelling is Australian slang for "firefighter". */ 'flourescent' : 'fluorescent', 'foriegn' : 'foreign', 'freind' : 'friend', /* ------------- G ------------ */ 'guage' : 'gauge', 'gratefull' : 'grateful', 'greatful' : 'grateful', 'garantee' : 'guarantee', 'garanty' : 'guarantee', 'garentee' : 'guarantee', 'guidence' : 'guidance', /* ------------- H ------------ */ 'harrass' : 'harass', 'heighth' : 'height', 'heigth' : 'height', 'heirarchy' : 'hierarchy', 'hors derves' : 'hors d\'oeuvres', 'ordeurves' : 'hors d\'oeuvres', 'humerous' : 'humorous', 'higeine' : 'hygiene', 'hiygeine' : 'hygiene', 'hygeine' : 'hygiene', 'hygene' : 'hygiene', 'hygine' : 'hygiene', 'hipocrit' : 'hypocrite', /* ------------- I ------------ */ 'ignorence' : 'ignorance', 'immitate' : 'imitate', 'imediately' : 'immediately', 'independant' : 'independent', 'indispensible' : 'indispensable', 'innoculate' : 'inoculate', 'inteligence' : 'intelligence', 'intelligance' : 'intelligence', /* ------------- K ------------ */ 'kernal' : 'kernel', /* ------------- L ------------ */ 'liesure' : 'leisure', 'liason' : 'liaison', 'libary' : 'library', 'liberry' : 'library', 'lightening' : 'lightning', /* ------------- M ------------ */ 'maintainance' : 'maintenance', 'maintnance' : 'maintenance', 'medeval' : 'medieval', 'medevil' : 'medieval', 'mideval' : 'medieval', 'momento' : 'memento', 'milennium' : 'millennium', 'millenium' : 'millennium', 'miniture' : 'miniature', 'miniscule' : 'minuscule', 'mischevious' : 'mischievous', // ---↘ 'mischevous' : 'mischievous', /* Nonstandard */ 'mischievious' : 'mischievous', // ---↗ 'mispell' : 'misspell', 'misspel' : 'misspell', /* ------------- N ------------ */ 'neccessary' : 'necessary', 'necessery' : 'necessary', 'neice' : 'niece', 'nieghbor' : 'neighbor', 'noticable' : 'noticeable', /* ------------- O ------------ */ 'occassion' : 'occasion', 'occasionaly' : 'occasionally', 'occassionally' : 'occasionally', 'occurence' : 'occurrence', 'occurrance' : 'occurrence', 'occured' : 'occurred', 'omision' : 'omission', 'ommision' : 'omission', 'orignal' : 'original', 'outragous' : 'outrageous', /* ------------- P ------------ */ 'parliment' : 'parliament', 'passtime' : 'pastime', 'pasttime' : 'pastime', 'percieve' : 'perceive', 'perseverence' : 'perseverance', 'personel' : 'personnel', 'personell' : 'personnel', 'plagerize' : 'plagiarize', 'playright' : 'playwright', 'playwrite' : 'playwright', 'posession' : 'possession', 'possesion' : 'possession', 'potatos' : 'potatoes', 'preceed' : 'precede', 'presance' : 'presence', 'privelege' : 'privilege', 'priviledge' : 'privilege', 'professer' : 'professor', 'promiss' : 'promise', 'pronounciation' : 'pronunciation', 'prufe' : 'proof', 'publically' : 'publicly', /* ------------- Q ------------ */ 'quarentine' : 'quarantine', 'que' : 'queue', /* "barbeque" (Bar-B-Que) should not be "que". */ 'questionaire' : 'questionnaire', 'questionnair' : 'questionnaire', /* ------------- R ------------ */ 'readible' : 'readable', 'realy' : 'really', 'recieve' : 'receive', 'reciept' : 'receipt', 'reccommend' : 'recommend', 'recomend' : 'recommend', 'refered' : 'referred', 'referance' : 'reference', 'refrence' : 'reference', 'relevent' : 'relevant', 'revelant' : 'relevant', 'religius' : 'religious', 'religous' : 'religious', 'repitition' : 'repetition', 'restarant' : 'restaurant', 'restaraunt' : 'restaurant', 'rime' : 'rhyme', /* Mispelling is the rare meteorological word that substitutes "hoarfrost" or otherwise shortens "freezing over" and similar which are more general and non-verbous. */ 'rythem' : 'rhythm', /* https://en.wikipedia.org/wiki/Rythem */ 'rythm' : 'rhythm', /* ------------- S ------------ */ 'secratary' : 'secretary', 'secretery' : 'secretary', 'sieze' : 'seize', 'seperate' : 'separate', 'similer' : 'similar', 'speach' : 'speech', 'speeche' : 'speech', 'succesful' : 'successful', 'successfull' : 'successful', 'sucessful' : 'successful', 'supercede' : 'supersede', /* https://www.merriam-webster.com/dictionary/supercede http://public.wsu.edu/~brians/errors/supercede.html */ 'suprise' : 'surprise', 'surprize' : 'surprise', /* ------------- T ------------ */ 'tomatos' : 'tomatoes', 'tommorow' : 'tomorrow', 'tommorrow' : 'tomorrow', 'twelth' : 'twelfth', 'tyrany' : 'tyranny', /* ------------- U ------------ */ 'untill' : 'until', 'upholstry' : 'upholstery', 'useable' : 'usable', 'usible' : 'usable', /* ------------- V ------------ */ 'vaccum' : 'vacuum', 'vaccuum' : 'vacuum', 'vacume' : 'vacuum', 'vehical' : 'vehicle', 'visious' : 'vicious', /* ------------- W ------------ */ 'wether' : 'weather/whether', 'wierd' : 'weird', 'welfair' : 'welfare', 'wellfare' : 'welfare', 'withold' : 'withhold', 'writeing' : 'writing', 'writting' : 'writing' };